Derby Notebook Data Model

graph LR subgraph Legend collection((collection)) object(object) list[ordered list] child_collection((child collection)) child_collection -. foreign key .-> collection object-- binding --- collection end subgraph URL /notebooks/ name(name) end subgraph Collections in Mongo notebooks((notebooks)) cells((cells)) userNotebooks((user
notebooks)) users((users)) messages((messages)) end userNotebooks -.-> notebooks userNotebooks -.-> users cells -.-> notebooks messages -.-> notebooks messages -.-> users subgraph _page notebook(notebook) userNotebook(user notebook) user(user) p_cells[cells] p_messages[messages] end subgraph Notebook Query nbq_name(name?) nbq_notebook(notebook) nbq_name --- nbq_notebook end notebooks --- nbq_notebook nbq_notebook --- notebook name --- nbq_name subgraph Cell Query cq_notebook(notebook?) cq_cells[cells] weight(weight) cq_notebook --- cq_cells weight --- cq_cells end nbq_notebook --- cq_notebook userNotebooks --- userNotebook users --- user cells --- cq_cells cq_cells --- p_cells messages --- p_messages subgraph Chat chat_messages[messages] new_message(new message) end p_messages --- chat_messages subgraph Chat.Editor ccm_source(source) end new_message --- ccm_source subgraph Chat.Markdown cmd_source(source) end chat_messages --- cmd_source subgraph Notebook nb_notebook(notebook) nb_cells[cells] end p_cells --- nb_cells notebook --- nb_notebook subgraph CellComponent cell(cell) userCell(user cell) end nb_cells --- cell userNotebook --- userCell subgraph Cell.Editor cm_source(source) end subgraph Cell.Markdown md_source(source) end cell --- cm_source cell --- md_source

In [2]:
%%html
<style>@import url("./nb-mermaid/nb-mermaid.css");</style>
<script>require(["nb-mermaid/nb-mermaid.js"]);</script>